<?php
class PNCategory extends PNObjectEx {
  function PNCategory($init=null, $where='')
  {
    $this->PNObject();

    $this->_objType       = 'icarrent_category';
    $this->_objField      = 'id';
    $this->_objPath       = 'form';

    $this->_init($init, $where);
  }
  function validate(){
    $form = FormUtil::getPassedValue ('form', false);
    if (empty($form['name'])){
      $message[] = 'field name must not be empty.';
      $this->setError($message);
      return false;
    }
    $this->clearError();
    return true;
  }

/*
  function &selectExtendResult(){
    $result = array();
    $result['icon'] = pnModAPIFunc('iCarrent', 'admin', 'getImage',
                         array('path' => CATEGORY_ICON_LARGE_PATH));
    return $result;
  }*/
}